/*
 * random.cpp
 *
 *  Created on: Aug 20, 2012
 *      Author: xkq
 */
#include <iostream>
#include <cstdlib>
#include <time.h>
using namespace std;

int main(){
	srand(time(NULL));
	//Generate # between 0-1
	cout<<(float)rand()/RAND_MAX<<endl;
	//Generate # between 0-RAND_MAX
	cout<<rand()<<endl;
	//Generate # between 1 and 10
	cout<<rand()%10+1<<endl;
	return 0;
}


